1. Field of The Invention
The present invention relates to a print control system, a print control method, and a recording medium in which a print control program has been recorded. The invention is particularly used for the control of a paper feed operation.
2. Related Background Art
Referring to FIGS. 1 through 7, a conventional print control system will be described below. This print control system is used for an ink jet printer. The schematic construction of this ink jet printer is shown in FIG. 1.
This ink jet printer comprises: a paper feed motor (which will be also hereinafter referred to as a PF motor) 1 for feeding a paper; a paper feed motor driver 2 for driving the paper feed motor 1; a carriage 3; a carriage motor (which will be also hereinafter referred to as a CR motor) 4 for driving the carriage 3; a CR motor driver 5 for driving the carrier motor 4; a DC unit 6; a pump motor 7 for controlling the suction of ink for preventing clogging; a pump motor driver 8 for driving the pump motor 7; a head 9 which is fixed to the carriage 3 for discharging ink to a printing paper 50; a head driver 10 for driving and controlling the head 9; a linear type encoder 11 which is fixed to the carriage 3; a code plate 12 which has slits at regular intervals; a rotary type encoder 13 for the PF motor 1; a paper detecting sensor 15 for detecting the position of the rear edge of a paper which is being printed; a CPU 16 for controlling the whole printer; a timer IC 17 for periodically generating an interruption signal to output the signal to the CPU 16; an interface part (which will be also hereinafter referred to as an IF) 19 for sending and receiving data to and from a host computer 18; an ASIC 20 for controlling printing resolution, the driving waveform of the head 9 and so forth, on the basis of printing information which is fed from the host computer 18 via the IF 19; a PROM 21, a RAM 22 and an EEPROM 23 which are used as work and program storage areas for the ASIC 20 and the CPU 16; a platen 25 for supporting thereon a paper 50 during printing; a carrier roller 27 which is driven by the PF motor 1 for carrying the printing paper 50; a pulley 30 which is mounted on the rotating shaft of the CR motor 4; and a timing belt 31 which is driven by the pulley 30.
Furthermore, the DC unit 6 is designed to drive and control the paper feed motor driver 2 and the CR motor driver 5 on the basis of a control command, which is fed from the CPU 16, and the outputs of the encoder 11 and 13. In addition, each of the paper feed motor 1 and the CR motor 4 comprises a DC motor.
The peripheral construction of the carriage 3 of this ink jet printer is shown in FIG. 2.
The carriage 3 is connected to the carriage motor 4 via the pulley 30 by means of the timing belt 31. The carriage 3 is driven to be guided by a guide member 22 so as to move in parallel to the platen 25. The surface of the carriage 3 facing the printing paper is provided with the recording head 9 which comprises a nozzle row for discharging a black ink and a nozzle row for discharging color inks. Each of the nozzle rows is supplied with ink from an ink cartridge 34, and discharges ink droplets to the printing paper to print characters and/or images thereon.
In the non-print region of the carriage 3, there are provided a capping unit 35 for sealing a nozzle opening of the recording head 9 during non-printing, and a pump unit 36 having the pump motor 7 shown in FIG. 1. When the carriage 3 moves from a print region to the non-print region, the carriage 3 contacts a lever (not shown) to move the capping unit 35 upwards to seal the head 9.
When the nozzle opening row of the head 9 is clogged up or when the cartridge 34 is exchanged or the like to force the head 9 to discharge inks, the pump unit 36 is operated while the head 9 is sealed, so that inks are sucked out of the nozzle opening row by a negative pressure from the pump unit 36. Thus, dust and paper powder adhering to a portion near the nozzle opening row are cleaned. Moreover, bubbles in the recording head 9, together with inks, are discharged to a cap 37.
Then, the construction of the linear type encoder 11 mounted on the carriage 3 is shown in FIG. 3. This encoder 11 comprises a light emitting diode 11a, a collimator lens 11b, and a detection processing part 11c. The detection processing part 11c has a plurality of (four) photodiodes 11d, a signal processing circuit 11e, and two comparators 11fA and 11fB.
If a voltage Vcc is applied between both ends of the light emitting diode 11a via a resistor, light rays are emitted from the light emitting diode 11a. The light rays are collimated by the collimator lens 11b to pass through the code plate 12. The code plate 12 is provided with slits at regular intervals (e.g., every 1/180 inches (=1/180xc3x972.54 cm)).
The parallel rays passing through the code plate 12 are incident on each of the photodiodes lid via a fixed slit (not shown), and converted into electric signals. The electric signals outputted from the four photodiodes lid are processed by the signal processing circuit 11e. The signals outputted from the signal processing circuit 11e are compared by the comparators 11fA and 11fB, and the compared results are outputted as pulses. The pulses ENC-A and ENC-B outputted from the comparators 11fA and 11fB are outputs of the encoder 11.
The phase of the pulse ENC-A is different from the phase of the pulse ENC-B by 90 degrees. The encoder 4 is designed so that the phase of the pulse ENC-A is advanced from the pulse ENC-B by 90 degrees as shown in FIG. 4A when the CR motor 4 is normally rotating, i.e., when the carriage 3 is moving a main scanning direction, and so that the phase of the pulse ENC-A lags behind the pulse ENC-B by 90 degrees as shown in FIG. 4B when the CR motor 4 is reversely rotating. One period T of the pulses corresponds to the distance between adjacent slits of the code plate 12 (e.g., 1/180 inches (=1/180xc3x972.54 cm)). This is equal to a period of time, in which the carriage 3 moves between the adjacent slits.
On the other hand, the rotary type encoder 13 for the PF motor 1 has the same construction as that of the linear type encoder 11, except that the code plate is a rotating disk which rotates in accordance with the rotation of the PF motor 1. The rotary type encoder 13 is designed to output the two output pulses ENC-A and ENC-B. Furthermore, in the ink jet printer, the distance between adjacent slits of the plurality of slits provided in the code plate of the encoder 13 for the PF motor is 1/180 inches (=1/180xc3x972.54 cm). When the PF motor 1 rotates by the distance between adjacent slits, the paper is fed by 1/1440 inches (=1/1440xc3x972.54 cm).
Referring to FIG. 5, the position of the paper detecting sensor 15 shown in FIG. 1 will be described below.
In FIG. 5, the paper 50 inserted into a paper feeding port 61 of a printer 60 is fed into the printer 60 by means of a paper feeding roller 64 which is driven by a paper feeding motor 63. The front edge of the paper 50, which has been fed into the printer 60, is detected by, e.g., an optical paper detecting sensor 15. The paper 50, the front edge of which has been detected by the paper detecting sensor 15, is fed by means of a paper feed roller 65 and a driven roller 66 which are driven by the PF motor 1.
Subsequently, ink drops from the recording head (not shown), which is fixed to the carriage 3 moving along the carriage guide member 32, to carry out a print. Then, when the paper is fed to a predetermined position, the rear edge of the paper 50, which is currently being printed, is detected by the paper detecting sensor 15. Then, a gear 67c is driven, via a gear 67b, by means of a gear 67a which is driven by the PF motor 1. Thus, a paper discharging roller 68 and a driven roller 69 are rotated to discharge the printed paper 50 from a paper discharging port 62 to the outside.
Referring to FIGS. 6 and 7, the control of the PF motor 1 of this conventional ink jet printer will be described below.
The control of the PF motor 1 is carried out by the DC unit 6. The DC unit 6 comprises a position counter 6a, a subtracting part 6b, a target speed calculating part 6c, a speed calculating part 6d, a subtracter 6e, a proportional element 6f, an integrating element 6g, a differentiating element 6h, an adder 6i, a D/A converter 6j, a timer 6k, and an acceleration control part 6m. 
The position counter 6a is designed to detect the leading and trailing edges of each of the output pulses ENC-A and ENC-B of the encoder 13 to count the number of the detected edges, and to calculate the paper feed amount of the paper, which is fed by the PF motor 1, on the basis of the counted value. In this counting, when the PF motor 1 is normally rotating, if one edge is detected, xe2x80x9c+1xe2x80x9d is added, and when the PF motor 1 is reversely rotating, if one edge is detected, xe2x80x9cxe2x88x921xe2x80x9d is added. Each of the periods of the pulses ENC-A and ENC-B is equal to the distance between adjacent slits of the code plate, and the phase of the pulse ENC-A is different from the phase of the pulse ENC-B by 90 degrees. Therefore, the counted value xe2x80x9c1xe2x80x9d in the above described counting corresponds to 1/4 of the distance between adjacent slits of the code plate of the encoder 13. In addition, if the PF motor 1 rotates by the distance between adjacent slits, the paper is fed by 1/1440 inches (=1/1440xc3x972.54 cm). Therefore, when the counted value of the position counter 6a is multiplied by 1/4xc3x971/1440 inches (=1/4xc3x971/1440xc3x972.54 cm), it is possible to obtain the paper feed amount from a position corresponding to a counted value xe2x80x9c0xe2x80x9d, i.e., a start-up starting position. At this time, the resolution of the encoder 13 is 1/5760 inches (=1/5760xc3x972.54 cm).
The subtracter 6b is designed to calculate a position deviation of the counted value of the position counter 6a from a target position.
The target speed calculating part 6c is designed to calculate a target speed of the PF motor 1 on the basis of the position deviation which is the output of the subtracter 6b. This calculation is carried out by multiplying the position deviation by a gain Kp. This gain Kp is determined in accordance with the position deviation. Furthermore, the value of the gain Kp may be stored in a table (not shown).
The speed calculating part 6d is designed to calculate a speed of the PF motor 1 on the basis of the output pulses ENC-A and ENC-B of the encoder 13. This speed is obtained as follows. First, the leading and trailing edges of each of the output pulses ENC-A and ENC-B of the encoder 13 are detected, and the time interval between the edges is counted by, e.g., a timer counter. Assuming that this counted value is T, the speed is in proportion to 1/T.
The subtracter 6e is designed to calculate a speed deviation of the actual speed of the PF motor 1, which is calculated by the speed calculating part 6d, from a target speed.
The proportional element 6f is designed to multiply the speed deviation by a constant Gp to output the multiplied result. The integrating element 6g is designed to integrate a value which is obtained by multiplying the speed deviation by a constant Gi. The differentiating element 6h is designed to multiply a difference between the present speed deviation and the last speed variation by a constant Gd to output the multiplied result. Furthermore, the calculations in the proportional element 6f, integrating element 6g and differentiating element 6h are carried out every one period of the output pulse ENC-A of the encoder 13, e.g., in synchronism with the leading edge of the output pulse ENC-A.
The outputs of the proportional element 6f, integrating element 6g and differentiating element 6h are added by the adder 6i. Then, the added result, i.e., the driving current of the PF motor 1, is fed to the D/A converter 6j to be converted into an analog current. On the basis of the analog current, the PF motor 1 is driven by the driver 2.
In addition, the timer 6k and the acceleration control part 6m are used for controlling acceleration, and the PID control using the proportional element 6f, integrating element 6g and differentiating element 6h is used for controlling the constant speed during deceleration and controlling deceleration.
The timer 6k is designed to generate a timer interruption signal every a predetermined time on the basis of a clock signal which is fed from the CPU 16.
The acceleration control part 6m is designed to integrate a predetermined current value (e.g., 20 mA) into a target current value every time it receives the timer interruption signal, and to feed the integrated result, i.e., the target current value of the PF motor 1 during acceleration, to the D/A converter 6j. Similar to the PID control, the target current value is converted into an analog current by the D/A converter 6j. On the basis of this analog current, the PF motor 1 is driven by the driver 2.
The driver 2 has, e.g., four transistors. By turning each of the transistors ON and OFF on the basis of the output of the D/A converter 6j, the driver 2 can be selectively in (a) an operation mode in which the PF motor 1 is normally or reversely rotated, (b) a regenerative brake operation mode (a short brake operation mode, i.e., a mode in which the stopping of the PF motor 1 is maintained), or (c) a mode in which the PF motor 1 is intended to be stopped.
Referring to FIGS. 7A and 7B, the operation of the DC unit 6 will be described below.
If a start-up command signal for starting the PF motor 1 is fed from the CPU 16 to the DC unit 6 when the PF motor 1 is stopped, a start-up initial current value Io is fed from the acceleration control part 6m to the D/A converter 6j. Furthermore, this start-up initial current value Io, together with the start-up command signal, is fed from the CPU 16 to the acceleration control part 6m. Then, this current value Io is converted into an analog current by the D/A converter 6j to be fed to the driver 2, and the PF motor 1 is started up by the driver 2 (see FIGS. 7A and 7B).
After the start-up command signal is received, the timer 6k generates a timer interruption signal every a predetermined time. Every time the acceleration control part 6m receives the timer interruption signal, the acceleration control part 6m integrates a predetermined current value (e.g., 20 mA) into the start-up initial current value Io, to feed the integrated current value to the D/A converter 6j. Then, the integrated current value is converted into an analog current by the D/A converter 6j to be fed to the driver 2. Then, the PF motor 1 is driven by the driver 2 so that the value of the current supplied to the PF motor 1 is the integrated current value, and the speed of the PF motor 1 increases (see FIG. 7B). Therefore, the current value supplied to the PF motor 1 is step-wise as shown in FIG. 7A.
Furthermore, at this time, although the PID control system also operates, the D/A converter 6j selects and incorporates the output of the acceleration control part 6m. 
The integration of the current value in the acceleration control part 6m is carried out until the integrated current value becomes a constant current value Is. When the integrated current value becomes the predetermined value Is at time t1, the acceleration control part 6m stops the integration, and supplies the constant current value Is to the D/A converter 6j. Thus, the PF motor 1 is driven by the driver 2 so that the value of the current supplied to the PF motor 1 becomes the current value Is (see FIG. 7A).
Then, in order to prevent the speed of the PF motor 1 from overshooting, the acceleration control part 6m controls the PF motor 1 so as to reduce the current, which is supplied to the PF motor 1, when the speed of the PF motor 1 becomes a predetermined speed V1 (time t2). At this time, the speed of the PF motor 1 further increases. However, when the speed of the PF motor 1 reaches a predetermined speed Vc (see time t3 in FIG. 7B), the D/A converter 6j selects the output of the PID control system, i.e., the output of the adder 6i, to carry out the PID control.
That is, the target speed is calculated on the basis of the position deviation of the counted value of the counter 6a from the target position. In addition, the proportional element 6f, integrating element 6g and differentiating element 6h are operated on the basis of the speed deviation of the actual speed, which is obtained from the output of the encoder 13, from the target speed to carry out the proportional, integrating and differentiating operations. Moreover, the PF motor 1 is controlled on the basis of the sum of these calculated results. Furthermore, the above described proportional, integrating and differentiating operations are carried out in synchronism with, e.g., the leading edge of the output pulse ENC-A of the encoder 13. Thus, the speed of the PF motor 1 is controlled so as to be a desired speed Ve. Furthermore, the predetermined speed Vc is preferably a value of 70% to 80% of the desired speed Ve.
The speed of the PF motor 1 is the desired speed Ve after time t4. Thereafter, the PF motor 1 approaches the target position (see time t5 in FIG. 7B), the PF motor 1 is decelerated, and the PF motor 1 is stopped at time t6.
In the conventional print control system with such a construction, the paper feed operation is carried out by the paper feed roller 65 and driven roller 66 which are driven by the PF motor 1, as described referring to FIG. 5. As shown in FIG. 8, the driven roller 66 is designed to press the paper 50 against the paper feed roller 65 by means of a spring 70 during the paper feed operation.
On the other hand, it is being required to print near the rear edge of the paper 50. To that end, it is required that the rear edge of the paper 50 is limited to a predetermined range shown in FIG. 9 by the paper feed roller 65 and the driven roller 66 (e.g., a range of 0.25 mm before and after a line drawn between the center of the paper feed roller 65 and the driven roller 66).
However, in the conventional printer, if a paper feed operation is carried out so that the rear edge of the paper 50 is positioned in a predetermined range, force F acts the paper 50 so as to send the paper 50 out by means of a spring 80 as shown in FIG. 9, since the driven roller 66 is pressed against the paper feed roller 65 by means of the spring 70. For that reason, the paper 50 is sent out between the paper feed roller 65 and the driven roller 66, or moves the driven roller 66 due to frictional force, so that there is a problem in that it is not possible to ensure the paper feed precision in the vicinity of the rear edge of the paper 50.
It is therefore an object of the present invention to eliminate the aforementioned problems and to provide a print control system, a print control method, and a recording medium in which a print program has been recorded, which are capable of ensuring the paper feed precision even in the vicinity of the rear edge of a paper.
According to the present invention, there is provided with a print control system comprising:
a position detecting part for detecting the position and traveling direction of an object to be controlled, which is controlled by a servomotor;
a speed detecting part for detecting a physical quantity corresponding to the speed of said object to be controlled;
a first control part for determining a current value or a voltage value, which is to be added to said servomotor, on the basis of the output of said position detecting part so that said object to be controlled is positioned within a target range, and for controlling said servomotor on the basis of the determined current value or the determined voltage value;
a second control part for determining a current value or a voltage value, which is added to said servomotor, on the basis of the output of each of said position detecting part and said speed detecting part so that said object to be controlled is positioned within said target range, and for controlling said servomotor on the basis of the determined current value or the determined voltage value;
a third control part for determining a current value or a voltage value of said servomotor on the basis of the output of said position detecting part so that said object to be controlled is stopped within a predetermined range, and for controlling said servomotor on the basis of the determined current value or the determined voltage value; and
a control selecting part, which operates in a predetermined timing, for determining whether said object to be controlled is positioned within said target range on the basis of the output of said position detecting part, said control selecting part selecting said third control part when said object to be controlled is positioned within said target range, and selecting said first or second control part on the basis of the output of said speed detecting part when said object to be controlled is positioned out of said target range, said control selecting part causing the selected control part to control said servomotor.
According to the invention, there is also provided with a print control system comprising:
a paper rear edge holding/driving control part for driving and controlling a paper feed motor so as to hold the rear edge of a paper, which is fed by said paper feed motor, in a predetermined holding region;
a usual paper feed control part for controlling said paper feed motor so as to carry out a usual paper feed operation; and
a control selecting part for selecting one of said paper rear edge holding/driving control part and said usual paper feed control part on the basis of the kind and feed amount of said paper and the presence of detection of the rear edge of said paper.
Furthermore, said paper rear edge holding/driving control part may comprise:
a position detecting part for detecting the position and traveling direction of said paper;
a speed detecting part for detecting a physical quantity corresponding to the feed speed of said paper;
a first control part for determining a current value or a voltage value, which is to be added to said paper feed motor, on the basis of the output of said position detecting part so that the rear edge of said paper is positioned within a target range, and for controlling said paper feed motor on the basis of the determined current value or the determined voltage value;
a second control part for determining a current value or a voltage value, which is to be added to said paper feed motor, on the basis of the output of each of said position detecting part and said speed detecting part so that the rear edge of said paper is positioned within said target range, and for controlling said paper feed motor on the basis of the determined current value or the determined voltage value;
a third control part for determining a current value or a voltage value of said paper feed motor on the basis of the output of said position detecting part so that the rear edge of said paper is stopped within a predetermined range, and for controlling said paper feed motor on the basis of the determined current value or the determined voltage value; and
a second control selecting part, which operates in a predetermined timing, for determining whether the rear edge of said paper is positioned within said target range on the basis of the output of said position detecting part, said second control selecting part selecting said third control part when the rear edge of said paper is positioned within said target range, and selecting said first or second control part on the basis of the output of said speed detecting part when the rear edge of said paper is positioned out of said target range, said second control selecting part causing the selected control part to control said paper feed motor.
Furthermore, said paper rear edge holding/driving control part may further comprise a differential control part, which is called to operate when each of said first through third control parts operates, for deriving a speed deviation of a feed speed of said paper during each operation from a reference speed and for calculating a current value or a voltage value which is in proportion to the difference between a speed deviation during the present operation and a speed deviation during the last operation.
Furthermore, said paper rear edge holding/driving control part may further comprise a differential control part, which is called to operate when each of said first through third control parts operates, for deriving a speed deviation of a feed speed of said paper during each operation from a reference speed and for calculating a current value or a voltage value which is obtained by multiplying the difference between a speed deviation during the present operation and a speed deviation during the last operation by a constant corresponding to said speed deviation.
Furthermore, said position detecting part may detect leading and trailing edges of an output pulse of an encoder which generates an output pulse in accordance with the rotation of said paper feed motor, said position detecting part having a counter which counts up the detected edges when said paper feed motor is normally rotating, and counts down the detected edges when said paper feed motor is reversely rotating, said position detecting part outputting a pulse in synchronism with said leading and trailing edges.
Furthermore, said second control selecting part may have a timer counter in which a counted value is reset when the counted value reaches a set value or when a pulse is received from said position detecting part, said second control selecting part selecting said first control part when no pulse is received from said position detecting part even if the counted value of said timer counter reaches said set value in a case where the rear edge of said paper is positioned out of said target range, and said second control selecting part selecting said second control part when a pulse is received from said position detecting part before the counted value of said timer counter reaches said set value in a case where the rear edge of said paper is positioned out of said target range.
Furthermore, when said first control part is selected by said second control selecting part,
if the position of the rear edge of said paper has not exceeded said target position or if the position of the rear edge of said paper has exceeded said target position and also has exceeded said target range, said first control part may add or subtract a predetermined change current value or a predetermined change voltage value to or from a current value or a voltage value which is currently applied to said paper feed motor, and control said paper feed motor on the basis of the calculated result, and
if the position of the rear edge of said paper is within said target range, said first control part may control said paper feed motor on the basis of a current value or a voltage value which is applied to said paper feed motor.
Furthermore, when said second control part is selected by said second control selecting part,
if the position of the rear edge of said paper has not exceeded said target position or if the position of the rear edge of said paper has exceeded said target position and also has exceeded said target range, said second control part may compare the output of said speed detecting part with a threshold to select a predetermined change current value or a predetermined change voltage value on the basis of the compared result to calculate a current value or a voltage value, which is to be applied to said paper feed motor, on the basis of the selected change current value or the selected change voltage value and a current value or a voltage value, which is currently applied to said paper feed motor, so that the rear edge of said paper is positioned within said target range, and control said paper feed motor on the basis of the calculated current value or the calculated voltage value, and
if the position of the rear edge of said paper is within said target range, said second control part may subtract a predetermined current value or a predetermined voltage value from a current value or a voltage value, which is applied to said paper feed motor, in the opposite direction to a current value or a voltage value in the traveling direction of said paper, and control said paper feed motor on the basis of the subtracted result.
Furthermore, said speed detecting part may have time measuring part for detecting leading and trailing edges of an output pulse of said encoder, and for measuring a time between adjacent edges, said speed detecting part outputting the measured result.
Furthermore, when said third control part is selected by said second control selecting part, said third control part may determine whether the rear edge of said paper is positioned within a predetermined allowable range including said target range, said third control part operating said first or second control part via said second control selecting part when the edge of said paper is positioned out of said predetermined allowable range.
According to the present invention, there is provided with a print control method for use in a print system comprising:
a position counter having a counter for detecting leading and trailing edges of an output pulse of an encoder which operates integrally with a paper fed by a paper feed motor, and for counting so as to count up the detected edges when said paper feed motor is normally rotating and so as to count down the detected edges when said paper feed motor is reversely rotating, said position counter outputting a pulse in synchronism with said leading and trailing edges;
a period counter for detecting leading and trailing edges of an output pulse of said encoder and for measuring a time between adjacent edges; and
a timer counter having a set value, the counted value of said timer counter being reset when the counted value reaches said set value or when said timer counter receives a pulse from said position counter,
said print control method comprising the steps of:
comparing the counted value of said position counter with a target position of the rear edge of said paper when a pulse is received from said position counter or when the counted value of said timer counter reaches said set value;
carrying out a hold control so that the rear edge of said paper is stopped within an allowable range including a target range including said target position, on the basis of the output of said position counter and a control parameter when the position of the rear edge of said paper is within said target range;
carrying out a timer interruption control so that the rear edge of said paper is positioned within said target range, on the basis of the output of said position counter when no pulse is received from said position counter even if the counted value of said timer counter reaches said set value in a case where the position of the rear edge of said paper is out of said target range; and
carrying out an encoder interruption control so that the position of the rear edge of said paper is within said target range, on the basis of the output of said position counter and the output of said period counter when a pulse is received from said position counter before the counted value of said timer counter reaches said set value in a case where the rear edge of said paper is not within said target range.
Furthermore, said step of carrying out the timer interruption control may comprise the steps of:
adding or subtracting said change current value or said change voltage value to or from a current value or a voltage value, which is currently applied to said paper feed motor, when the position of the rear edge of said paper has not exceed said target position or when the position of the rear edge of said paper has exceeded said target position and also has exceeded said target range, and controlling said paper feed motor on the basis of the calculated result; and
controlling said paper feed motor on the basis of a current value or a voltage value, which is applied to said paper feed motor, when the position of the rear edge of said paper is within said target range.
Furthermore, said step of carrying out the encoder interruption control may comprise the steps of:
comparing the output of said period counter with a threshold to select a predetermined change current value or a predetermined change voltage value on the basis of the compared result to calculate a current value or a voltage value, which is to be applied to said paper feed motor, on the basis of the selected change current value or the selected change voltage value and a current value or a voltage value, which is currently applied to said paper feed motor, so that the rear edge of said paper is positioned within said target range, and controlling said paper feed motor on the basis of the calculated current value or the calculated voltage value, if the position of the rear edge of said paper has not exceeded said target position or if the position of the rear edge of said paper has exceeded said target position and also has exceeded said target range; and
subtracting a predetermined current value or a predetermined voltage value from a current value or a voltage value, which is applied to said paper feed motor, in the opposite direction to a current value or a voltage value in the traveling direction of said paper, and controlling said paper feed motor on the basis of the subtracted result, if the position of the rear edge of said paper is within said target range.
Furthermore, said step of carrying out the hold control may include a step of determining whether the position of the rear edge of said paper is within a predetermined allowable range including said target range, and operating said timer interruption control or said encoder interruption control when the position of the rear edge of said paper is not within said allowable range.
According to the present invention, there is provided with a recording medium in which a print control program for controlling a print by means of a computer has been recorded, said print control program comprising:
the procedure for comparing the counted value of a position counter for detecting the present position and the traveling direction of a paper with the position of the rear edge of said paper when a pulse is received from said position counter or when the counted value of a timer counter reaches a set value;
the procedure for carrying out a hold control so that the rear edge of said paper is stopped within an allowable range including a target range including said target position, on the basis of the output of said position counter when the position of the rear edge of said paper is within said target range;
the procedure for carrying out a timer interruption control so that the rear edge of said paper is positioned within said target range, on the basis of the output of said position counter when no pulse is received from said position counter even if the counted value of said timer counter reaches said set value in a case where the position of the rear edge of said paper is not within said target range; and
the procedure for carrying out an encoder interruption control so that the position of the rear edge of said paper is within said target range, on the basis of the output of said position counter and the output of a period counter for detecting leading and trailing edges of an output pulse of an encoder and for measuring a time between adjacent edges, when a pulse is received from said position counter before the counted value of said timer counter reaches said set value in a case where the rear edge of said paper is not within said target range.